﻿@{
    ViewBag.Title = "AddMediaType";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}


@section scripts
{
    <script type="text/javascript" src="~/Scripts/App/Admin/mediatype_add.js"></script>
}

<div class="content-header">
    <div class="header-section">
        <h1>
            <i class="gi gi-certificate"></i>Quản Lý Định Dạng Quảng Cáo<br>
            <small>Tạo Mới</small>
        </h1>
    </div>
</div>
<ul class="breadcrumb breadcrumb-top">
    <li><a href="../Admin/index"><i class="fa fa-home"></i></a></li>
    <li><a href="../Admin/ListMediatype">Định Dạng QC</a></li>
    <li><a href="../Admin/AddMediatype">Tạo Mới</a></li>
</ul>
<div class="block block-alt-noborder">
    <form class="form-horizontal form-bordered" novalidate="novalidate" id="addmedia_frm">
        <div class="form-group">
            <label for="val_name" class="col-md-4 control-label">Tên Định Dạng<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input type="text" data-bind="value: Name" placeholder="Chứa ít nhất 2 ký tự..." class="form-control" name="val_name" id="val_name">
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="val_mime" class="col-md-4 control-label">Tên Định Dạng<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <select id="val_mime" name="val_mime" class="select-chosen" data-placeholder="Chọn Phẩn Mở Rộng..." data-bind="options: mimeList, optionsValue: 'value', optionsText: 'name', value: Mime, chosen: true">
                        </select>
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="val_icon" class="col-md-4 control-label">Định Dạng Icon<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <img id="prethum" height="187" width="300" src="~/Advertise/DefaultAssets/defaultPreview.jpg" alt="Preview Thumbail">
                <div class="input-group">
                    <input accept="image/*" type="file" data-bind="fileUpload: { property: 'IconPath', url: '/api/AdminMediaType/PostMediaTypeIcon' }" class="form-control" name="val_icon" id="val_icon">
                    <span class="input-group-addon"><i class="gi gi-playing_dices"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="val_description" class="col-md-4 control-label">Mô Tả Định Dạng <span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <textarea placeholder="mô tả loại quảng cáo" data-bind="value: Description" class="form-control" name="val_description" id="val_description" rows="6"></textarea>
                    <span class="input-group-addon"><i class="gi gi-playing_dices"></i></span>
                </div>
            </div>
        </div>
        <div class="form-actions form-group">
            <div class="col-md-8 col-md-offset-4">
                <button class="btn btn-sm btn-primary" id="btn_submit" type="submit">Tạo Mới</button>
                <a href="~/Admin/ListMediatype" class="btn btn-sm btn-warning">Danh Sách</a>
            </div>
        </div>
    </form>
</div>